package com.entity;

import cn.hutool.core.date.DateTime;
import com.group.SupplierAddGroup;
import com.group.SupplierModifyGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

//供应商表
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Supplier {
    @NotNull(message = "部门id不能为空")
    private Integer sid;//供应商编号
    @NotBlank(groups= SupplierAddGroup.class,message="供应商名字不能为空")
    private String sname;//供应商名称
    @NotBlank(groups= {SupplierAddGroup.class, SupplierModifyGroup.class},message="联系人不能为空")
    private String contacts;//联系人
    @NotBlank(groups= {SupplierAddGroup.class, SupplierModifyGroup.class},message="联系电话不能为空")
    private String sphone;//联系电话
    private String address;//供应商地址
    private String mainpro;//主要销售产品
    private String bank;//开户银行
    @Size(min=16,max=19,message = "银行卡号的长度{min}-{max}",groups= SupplierAddGroup.class)
    private String banknum;//银行卡账号
    private String updatetime;//更新时间
    private String status;//状态  正常/冻结
    private Integer isdelete;//逻辑删除

}
